package com.billionsfinance.hessian.common.utils;

import org.apache.commons.lang3.StringUtils;

/**
 * @ FileName: ZkPathBuilder.java
 * @ Author: WeiHui-Z
 * @ Date: 2016-11-24  9:14
 * @ Version: v1.0.0
 */
public class ZkPathBuilder {

	private static final String provider = "PROVIDER";

	/**
	 * 构建 zookeeper 路径
	 *
	 * @param group   组
	 * @param name    className
	 * @param edition 版本
	 * @return 路径
	 */
	public static String buildPath(String group, String name, String edition) {
		group = "/" + group;
		return StringUtils.joinWith("/", group, name, edition, provider);
	}
}
